package test.pcs;

import com.google.gson.Gson;
import com.payment.lc.pcs.client.wrap.service.ProductionWrapService;
import com.payment.lc.pcs.common.enums.GroupType;
import com.payment.lc.pcs.service.api.DynamicDataService;
import com.payment.lc.pcs.service.api.ProductionService;
import com.payment.lc.pcs.service.api.fund.JMFundService;
import com.payment.lc.pcs.service.domain.ListWrapper;
import com.payment.lc.pcs.service.domain.Production;
import com.payment.lc.pcs.service.domain.ProductionV2;
import com.payment.lc.pcs.service.request.GetFundListReq;
import com.payment.lc.pcs.service.response.GetFundListResp;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.text.SimpleDateFormat;

/**
 * Created on 2016/8/8.
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "classpath:context-ws.xml")
public class PcsTest3 {

    Gson gson = new Gson();


    private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");

    @Autowired
    ProductionService productionService;

    @Autowired
    DynamicDataService dynamicDataService;

    @Autowired
    JMFundService jmFundService;

    @Autowired
    ProductionWrapService productionWrapService;


    @Test
    public void test() {
        test1();
    }

    void test1() {
        ListWrapper<Production> dingqiMore = productionService.getDisplayDownOrderedProductions(GroupType.MobileFrontPageGroup, "HuoqiList");
        print(dingqiMore);
    }


    public void print(Object object) {
        System.out.println("value = " + gson.toJson(object));
    }

    @Before
    public void before() {
        System.out.println("--------------------------");
        System.out.println("--------------------------");
    }

    @After
    public void after() {
        System.out.println("--------------------------");
        System.out.println("--------------------------");
    }
}
